package com.rapida.framwork;

import android.content.Context;
import android.content.SharedPreferences;

public class ModeImpl implements IModel {
	private SharedPreferences mPref;

	public ModeImpl(Context context) {
		this(context, "RapidPreference");
	}

	public ModeImpl(Context context, String name) {
		mPref = context.getSharedPreferences(name, Context.MODE_PRIVATE);
	}

	@Override
	public String getString(String key, String defValue) {
		return mPref.getString(key, defValue);
	}

	@Override
	public void putString(String key, String value) {
		mPref.edit().putString(key, value).commit();
	}

}
